package com.wdhcr.yygh.oss.controller;

import com.wdhcr.yygh.common.result.Result;
import com.wdhcr.yygh.oss.utils.OssUtils;
import lombok.SneakyThrows;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/api/oss/file")
public class OssController {


    @SneakyThrows
    @GetMapping("/getPolicy")
    public Result getPolicy() {
        Map<String, String> ossPolicy = OssUtils.getOssPolicy();
        return Result.ok(ossPolicy);
    }
}
